import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/ruoyi";

//查询用工需求列表
export function getWorkerNeedList(query) {
  return request({
    url: '/operation/need/getWorkerNeedList',
    method: 'get',
    params: query
  })
}

// 作废用工需求
export function deleteWorkerNeed(workerNeedId) {
  return request({
    url: '/operation/need/deleteWorkerNeed/' + workerNeedId,
    method: 'delete'
  })
}

// 用工需求审核
export function auditWorkerNeed(data) {
  return request({
    url: '/operation/need/auditWorkerNeed',
    method: 'post',
    data: data
  })
}

/**
 * 用工需求详情
 * @param operationNeedId
 */
export function viewWorkerNeed(workerNeedId) {
  return request({
    url: '/operation/need/viewWorkerNeed/' + workerNeedId,
    method: 'get'
  })
}

/**
 * 用工需求测算
 * @param data
 */
export function updateWorkerNeed(data) {
  return request({
    url: '/operation/need/updateWorkerNeed',
    method: 'post',
    data: data
  })
}

